package info.rongtong.service.impl;

import info.rongtong.domain.Category;
import info.rongtong.service.basic.BasicServiceImpl;
import info.rongtong.service.inter.CategoryServiceInter;

import java.util.List;

public class CategoryServiceImpl extends BasicServiceImpl implements
		CategoryServiceInter {
	public List<Category> getAllCategory(){
		String hql="from Category";
		return this.executeQuery(Category.class, hql, null, 0,8);
	}

	public List<Category> getCategoryByType(Integer isPhoto) {
		String hql="from Category c where c.isPhoto=?";
		Object[] obj = {isPhoto};
		return this.executeQuery(Category.class, hql, obj, 0,8);
	}

}
